<?php

namespace common\models\member;

use Yii;

/**
 * This is the model class for table "{{%member_attr}}".
 *
 * @property int $id
 * @property int $member_id
 * @property string $project_id 所属项目ID（允许存在多个）
 * @property string $department_id 所属部门ID
 * @property int $job_id 岗位ID
 * @property int $operation_id 操作人ID【member_id】
 * @property int $created_at 添加时间
 * @property int $updated_at 更新时间
 */
class Attr extends \common\models\base\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%member_attr}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['member_id', 'job_id', 'operation_id', 'created_at', 'updated_at'], 'integer'],
            [['project_id', 'department_id'], 'required'],
            [['project_id', 'department_id'], 'safe'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'member_id' => 'Member ID',
            'project_id' => '所属项目ID（允许存在多个）',
            'department_id' => '所属部门ID',
            'job_id' => '岗位ID',
            'operation_id' => '操作人ID【member_id】',
            'created_at' => '添加时间',
            'updated_at' => '更新时间',
        ];
    }
}
